<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var names = ['tom', 'jerry', 'lucy', 'lili']
        // console.log(names[0], names[2])
        // console.log(names[6])
        // console.log(names.length)

        // names.reverse()

        // names.push('lala')

        // var str = names.join('-')
        // console.log(str)

        // console.log(names.indexOf('lili'))

        console.log(names.slice(1,3)) // 左闭右开
        console.log(names.slice(1)) 
    </script>
</head>
<body>
    
</body>
</html>